package cn.ecasoft.common.message.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author wm
 * @Package cn.jianshe.certificate.licence.dao
 * @date 2021/11/29 16:28
 */
@Mapper
public interface NotifyInfoDAO {

    @Select("select TOUSERID,TITLE, MESSAGE from sys_notifyinfo where issended = 0")
    public List<HashMap> selecAll();

    @Select("select clientid from od_ucid_userclient where userid=#{userid}")
    public Map selectClientIdByUserId(@Param("userid") String userid);
    @Update("update  sys_notifyinfo set issended = 1 where userid=#{userid}")
    public  Integer updateStatus (@Param("userid") String userid);
}
